<?php

class TranslateModule extends fvModule {

    function __construct () {
        $moduleName = strtolower(substr(__CLASS__, 0, -6));

        parent::__construct(fvSite::$fvConfig->get("modules.{$moduleName}.smarty.template"), 
                            fvSite::$fvConfig->get("modules.{$moduleName}.smarty.compile"), 
                            fvSite::$Layoult);
    }

    function showIndex() {
    	$lines = unserialize(file_get_contents(LANGUAGES_FILE));
    	$languages = array("rus", "ukr", "eng", "fra", "ita");
    	$this->__assign('Lines', $lines);
        $this->__assign('Languages', $languages);
        return $this->__display('translate_list.tpl');    
    }
    
    function showEdit() {
    	$languages = array("rus", "ukr", "eng", "fra", "ita");
    	$this->__assign('Languages', $languages);
    	return $this->__display('translate_edit.tpl');
    }

}

?>
